from typing import Callable, Dict, List, Any

class EventBus:
    def __init__(self):
        self._subs: Dict[str, List[Callable[[Any], None]]] = {}

    def publish(self, event: str, data: Any) -> None:
        for cb in list(self._subs.get(event, [])):
            try:
                cb(data)
            except Exception:
                pass

    def subscribe(self, event: str, callback: Callable[[Any], None]) -> bool:
        self._subs.setdefault(event, [])
        if callback not in self._subs[event]:
            self._subs[event].append(callback)
        return True

    def unsubscribe(self, event: str, callback: Callable[[Any], None]) -> bool:
        arr = self._subs.get(event, [])
        if callback in arr:
            arr.remove(callback)
            return True
        return False